import { Globals } from './../../../shared/global';
import { Router } from '@angular/router';
import { EquipmentService } from './../services/equipment';
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'ree-product',
  templateUrl: './product.component.html',
  styleUrls: ['./product.component.scss']
})
export class ProductComponent implements OnInit {

  productSetting=[];

  constructor(private equipmentService:EquipmentService,private route:Router,private globals:Globals) { }

  ngOnInit() {
    this.getProductSetting();
  }
  
  getProductSetting(){
    this.equipmentService.getProductSetting().then(data=>this.productSetting=data)
  }

  createProduct(){
    this.route.navigateByUrl('work/equipment/createProduct')
    this.globals.paths.path.push({ name: "新增设备类型", route: 'equipment/createProduct' })    
  }
  
}
